<style>
    .layui-btn:not(.layui-btn-lg ):not(.layui-btn-sm):not(.layui-btn-xs) {
        height: 34px;
        line-height: 34px;
        padding: 0 8px;

    }
</style>

<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-tab layui-tab-brief" lay-filter="current">
            <ul class="layui-tab-title">
                <li class="layui-this" lay-id="1">官方直采</li>
                <li lay-id="2">采集配置</li>
                <li><a href="{:url('main.collectCategory/index')}">采集栏目映射</a></li>
                <li><a href="{:url('main.collect/log')}">采集记录</a></li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">

                        <div class="layui-collapse" id="ul-collapse">

                        </div>

                </div>
                <div class="layui-tab-item">
                    <form class="layui-form layuimini-form">
                        <input type="hidden" name="field" value="collect">
                        <div class="layui-form-item">
                            <label class="layui-form-label">发布状态</label>
                            <div class="layui-input-block">
                                    <input type="radio" name="publish" value="0" title="不发布" {if condition="sysconfig('collect.publish') eq 0" }checked{/if}>
                                    <input type="radio" name="publish" value="1" title="发布" {if condition="sysconfig('collect.publish') eq 1" }checked{/if}>
                            </div>
                        </div>
                         <div class="layui-form-item">
                                <label class="layui-form-label">图片本地化</label>
                             <div class="layui-input-block">
                                 <input type="radio" name="downpic" value="0" title="默认" {if condition="sysconfig('collect.downpic') eq 0" }checked{/if}>
                                 <input type="radio" name="downpic" value="1" title="本地化" {if condition="sysconfig('collect.downpic') eq 1" }checked{/if}>
                          </div>
                        </div>
                        <div class="hr-line"></div>
                        <div class="submit-info text-center">
                            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="system.config/save" data-refresh="false">确认</button>
                            <a class="layui-btn layui-btn-primary layui-btn-sm" layform-close>关闭</a>
                        </div>

                    </form>

                </div>

            </div>
        </div>
    </div>
</div>

<script id="temp" type="text/html">
    {{# layui.each(d, function(index, item){ }}
    <div class="layui-colla-item">
        <h2 class="layui-colla-title">{{item.name}}</h2>
        <div class="layui-colla-content layui-show">
            <table class="layui-table">
                <colgroup>

                    <col width="150">
                    <col width="400">
                    <col width="150">
                    <col>
                    <col>
                </colgroup>
                <thead>
                <tr>

                    <th>站点</th>
                    <th>描述</th>
<!--                    <th>最后更新</th>-->
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {{# layui.each(item.childrens, function(index, item2){ }}
                <tr>


                    <td class="view-li" style="cursor: pointer" data-site="{{item2.site_name}}" data-name="{{item2.name}}" data-sitetype="{{item.site_type}}">
                        <img style="width: 24px" src="{{item2.ico}}"> {{item2.name}}
                    </td>
                    <td>{{item2.description}}</td>
<!--                    <td>{{item2.last_update}}</td>-->
                    <td>
                        <button type="button" data-site="{{item2.site_name}}" data-name="{{item2.name}}" data-sitetype="{{item.site_type}}"
                                class="layui-btn layui-btn-primary layui-btn-sm view-li">数据列表
                        </button>
                        <button type="button" class="layui-btn layui-btn-primary layui-btn-sm timing" data-sitename="{{item2.site_name}}">任务链接</button>
                    </td>
                </tr>
                {{# }); }}
                </tbody>
            </table>
        </div>
    </div>
    {{# }); }}
</script>
<script>
    var jobUrl="{$jobUrl}";
    layui.use('element', function(){
        var element = layui.element;
        //获取hash来切换选项卡，假设当前地址的hash为lay-id对应的值
        var layid = location.hash.replace(/^#current=/, '');//current为刚才定义的lay-filter
        element.tabChange('current', layid); //假设当前地址为：http://a.com#current=two，那么选项卡会自动切换到“资产发现”这一项
        //监听Tab切换，以改变地址hash值
        element.on('tab(current)', function(){
            location.hash = 'current='+ this.getAttribute('lay-id');
        });
    });
</script>


